package iterator;

public class Test {
	public static void main(String[] args) {
		ArrayList<Book> arrayList =  new ArrayList<Book>(10);
		arrayList.add(new Book("1"));
		arrayList.add(new Book("2"));
		System.out.println(arrayList.size());
		Iterator<Book> iterator = arrayList.iterator();
		while (iterator.hasNext()) {
			Book book = iterator.next();
			System.out.println(book.getName());
		}
	}
}
